import storage from '@/platforms/wechat/storage'

const storagePlugin = store => {
  store.subscribe((mutation, state) => {
    Object.keys(state).forEach(item => {
      storage.set(item, state[item])
    });
  });
};

export default [storagePlugin];
